<template>
    <div class="default-main2 ba-table-box" style="margin-top: 10px;">
        <el-card style="width:98%;float: left;margin-left: 1%;">
            <el-tabs type="border-card">
                <el-tab-pane label="基础配置">
                    <el-form :model="form" label-width="auto" style="max-width: 600px">
                        <el-form-item label="客服电话">
                            <el-input v-model="form.kefu" />
                        </el-form-item>
                        <el-form-item label="logo">
                            <el-upload />
                        </el-form-item>
                    </el-form>
                </el-tab-pane>
                <el-tab-pane label="微信相关">
                    <el-form :model="form" label-width="auto" style="max-width: 600px">
                        <el-form-item label="小程序APP ID">
                            <el-input v-model="form.xcx_appid" />
                        </el-form-item>
                        <el-form-item label="小程序APP SERCERT">
                            <el-input v-model="form.xcx_appsercert" />
                        </el-form-item>

                        <el-form-item label="微信支付商户号">
                            <el-input v-model="form.wxpay_merchant_id" />
                        </el-form-item>
                        <el-form-item label="微信支付APIV2秘钥">
                            <el-input v-model="form.wxpay_api_key" placeholder="32位字符"/>
                        </el-form-item>
                        <el-form-item label=" ">
                            <el-button type="primary" @click="subform">保存</el-button>
                        </el-form-item>
                       
                    </el-form>
                </el-tab-pane>
                <el-tab-pane label="订单相关">
                    <el-form :model="form" label-width="auto" style="max-width: 600px">
                        <el-form-item label="开启到点自提">
                                <el-radio-group v-model="form.ziti">
                                    <el-radio value="1">是</el-radio>
                                    <el-radio value="0">否</el-radio>
                                </el-radio-group>
                        </el-form-item>
                        <el-form-item label="自动收货时间">
                            <el-input v-model="form.auto_shou_day" placeholder="单位：天"/>
                        </el-form-item>

                        <el-form-item label="退货收货人信息">
                            <el-input v-model="form.tui_info" />
                        </el-form-item>
                        
                    </el-form>
                </el-tab-pane>
                <el-tab-pane label="其他配置">

                </el-tab-pane>
            </el-tabs>
            

        </el-card>

         
        

    </div>
</template>

<script setup lang="ts">
import { ref, provide,onMounted,nextTick} from 'vue'
import baTableClass from '/@/utils/baTable'
import Table from '/@/components/table/index.vue'
import TableHeader from '/@/components/table/header/index.vue'
import { defaultOptButtons } from '/@/components/table'
import { baTableApi } from '/@/api/common'
import { useI18n } from 'vue-i18n'
import createAxios from "/@/utils/axios";
import { ElMessage,ElMessageBox} from 'element-plus'
defineOptions({
    name: 'statics/rank',
})

const form = ref({})
const { t } = useI18n()
const data = ref([])
const tong = ref([])
onMounted(() => {
        getdata()
})
const getdata = () =>{
    return createAxios({
        url: '/admin/store.Shop/getShopSettings',
        method: 'post',
        data:{}
    }).then(res => {
        if(res.code == 1){
             form.value = res.data.data
        }
    }).catch(err => {

    })
}
const subform = () =>{
    return createAxios({
        url: '/admin/store.Shop/subShopSettings',
        method: 'post',
        data:{'data':form.value}
    }).then(res => {
        if(res.code == 1){
            ElMessage({'message':"保存成功",'type':'success'})
        }
    }).catch(err => {

    })
}

</script>

<style scoped lang="scss">
.table{
     border:1px solid #eee;
     width: 100%;
     border-collapse: collapse; /* 合并边框，消除间隙 */
}
.table th{
    border: 1px solid #eee;
    padding: 10px;
    text-align: left;
}
.table td{
    border: 1px solid #eee;
    padding: 10px;
}
.table tr .bg{
    background-color: #f5f7fa;
    font-weight: bold;
    text-align: justify;
}
.table tr .tc{
    text-align: center;
}
.table tr .yuan{
    background-color: #ccc;
    width: 22px ;
    height: 22px;
    display: block;
    text-align: center;
    border-radius: 100%;
    color:#fff;
    font-size: 11px;
    line-height: 22px;
    margin: 0 auto;
}
.table tr .yuan0{
    background-color: #99CC33;
}
.table tr .yuan1{
    background-color: #FF6666;
}
.table tr .yuan2{
    background-color: #FF9900;
}
.small-panel {
    // background-color: #e9edf2;
    background-color: #f4f4f4;
    border-radius: var(--el-border-radius-base);
    padding:10px;
    margin-bottom: 20px;

    .small-panel-title {
        color: #92969a;
        font-size: 15px;
    }

    .small-panel-content {
        display: flex;
        align-items: flex-end;
        margin-top: 0px;
        color: #2c3f5d;

        .content-left {
            font-size: 20px;

            .icon {
                margin-right: 10px;
            }

            span {
                display: inline-block;
                font-size: 18px;
            }
            b{
                font-size: 10px;
            }
        }

        .content-right {
            font-size: 14px;
            margin-left: auto;
        }

        .color-success {
            color: var(--el-color-success);
        }

        .color-warning {
            color: var(--el-color-warning);
        }

        .color-danger {
            color: var(--el-color-danger);
        }

        .color-info {
            color: var(--el-text-color-secondary);
        }
    }
}
</style>
